import { createApp } from 'vue'
import App from './App.vue'
import router from '@/router/index'
import store from '@/store/index'
import axiosArr from '@/api/config'
import 'vant/lib/index.css'
import vantComponent from '@/components/vant/index'
import FILTERS from './filters'
require('@/mock/index')
if (process.env.NODE_ENV === 'development') {
  require('@/vconsole/index') //vconsole移动端终端查看器
}
const app = createApp(App)
app.config.devtools = true
// 注册请求方式
for (const axios of axiosArr) {
  app.config.globalProperties[axios.name] = axios.fn
}
// 注册全局过滤器
for (const filter of FILTERS) {
  app.config.globalProperties[filter.name] = filter.fn
}
// console.log('app:', app)

app.use(router).use(store).use(vantComponent) //注册全局组件
app.mount('#app')
